﻿using Core.Domain.Entities;
using Core.Migrations.Extensions;
using FluentMigrator;

namespace Infrastructure.Persistence.Migrations.Permissions;

[Migration(202511032037)]
public class AddScopeColumn : ForwardOnlyMigration
{
    public override void Up()
    {
        Alter.Table(typeof(Permission).GetTableName())
          .InSchema(SchemaNames.Identity)
          .AddColumn(MigrationExpressions.ColumnNameFor<Permission>(nameof(Permission.Scope)))
          .AsString(256).Nullable()
          .WithDefaultValue("Tenant")
          .WithColumnDescription("Platform：平台专用，Tenant：租户可用");
    }
}
